﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace WebServices.Tuan2
{
    [XmlRoot(ElementName = "books")]
    class Books
    {
        [XmlElement(ElementName="book")]
        public List<Book> ListBook { get; set; }
    }
    
    class Book
    {
        [XmlAttribute(AttributeName="id")]
        public int Id { get; set; }

        [XmlElement(ElementName = "title")]
        public string Title { get; set; }

        [XmlElement(ElementName = "author")]
        public List<string> AuthorName { get; set; }

        //[XmlElement(ElementName = "book")]
        //public int CategoryId { get; set; }

        [XmlElement(ElementName = "language")]
        public string Language { get; set; }

        [XmlElement(ElementName = "year")]
        public int Year { get; set; }

        [XmlElement(ElementName = "price")]
        public decimal Price { get; set; }

        public string Status { get; set; }

    }
}
